home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / libraries / mathffp.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  2KB  |  81 lines

  1. #ifndef    LIBRARIES_MATHFFP_H
  2. #define    LIBRARIES_MATHFFP_H 1
  3. /*
  4. **    $Filename: libraries/mathffp.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.2 $
  7. **    $Date: 90/05/01 $
  8. **
  9. **    general floating point declarations
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef PI
  16. #define PI      ((float) 3.141592653589793)
  17. #endif
  18. #define TWO_PI      (((float) 2) * PI)
  19. #define PI2      (PI / ((float) 2))
  20. #define PI4      (PI / ((float) 4))
  21. #ifndef E
  22. #define E      ((float) 2.718281828459045)
  23. #endif
  24. #define LOG10      ((float) 2.302585092994046)
  25.  
  26. #define FPTEN      ((float) 10.0)
  27. #define FPONE      ((float) 1.0)
  28. #define FPHALF      ((float) 0.5)
  29. #define FPZERO      ((float) 0.0)
  30.  
  31. #define trunc(x)  ((int) (x))
  32. #define round(x)  ((int) ((x) + 0.5))
  33. #define itof(i)   ((float) (i))
  34.  
  35. #define    fabs    SPAbs
  36. #define floor    SPFloor
  37. #define    ceil    SPCeil
  38.  
  39. #define    tan    SPTan
  40. #define    atan    SPAtan
  41. #define cos    SPCos
  42. #define acos    SPAcos
  43. #define sin    SPSin
  44. #define asin    SPAsin
  45. #define exp    SPExp
  46. #define pow(a,b)    SPPow((b),(a))
  47. #define log    SPLog
  48. #define log10    SPLog10
  49. #define sqrt    SPSqrt
  50.  
  51. #define    sinh    SPSinh
  52. #define cosh    SPCosh
  53. #define tanh    SPTanh
  54.  
  55.  
  56. int     SPFix();              /* Basic math functions */
  57. float     SPFlt();
  58. int     SPCmp();
  59. int     SPTst();
  60. float     SPAbs();
  61. float     SPFloor();
  62. float     SPCeil();
  63. #ifndef abs
  64. float     abs();
  65. #endif
  66. float     SPNeg();
  67. float     SPAdd();
  68. float     SPSub();
  69. float     SPMul();
  70. float     SPDiv();
  71.  
  72. float     SPAsin(),  SPAcos(),  SPAtan();  /* Transcendental math functions */
  73. float     SPSin(),   SPCos(),   SPTan(),   SPSincos();
  74. float     SPSinh(),  SPCosh(),  SPTanh();
  75. float     SPExp(),   SPLog(),   SPLog10(), SPPow();
  76. float     SPSqrt(),  SPFieee();
  77.  
  78. float     afp(),    dbf();          /* Math conversion functions */
  79.  
  80. #endif    /* LIBRARIES_MATHFFP_H */
  81.